﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

namespace TGIApp.Service
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            log4net.Config.XmlConfigurator.Configure();
            System.Web.ApplicationServices.AuthenticationService.Authenticating +=new EventHandler<System.Web.ApplicationServices.AuthenticatingEventArgs>(AuthenticationService_Authenticating);
            
           // System.Web.ApplicationServices.AuthenticationService.CreatingCookie += new EventHandler<System.Web.ApplicationServices.CreatingCookieEventArgs>(AuthenticationService_CreatingCookie);

            System.Web.ApplicationServices.RoleService.SelectingProvider += new EventHandler<System.Web.ApplicationServices.SelectingProviderEventArgs>(RoleService_SelectingProvider);

        }

        void AuthenticationService_Authenticating(object sender, System.Web.ApplicationServices.AuthenticatingEventArgs e)
        {
            
            //e.Authenticated = Membership.Providers["OdbcProvider"].ValidateUser(e.UserName, e.Password);
            //e.AuthenticationIsComplete = true;

        }
        void RoleService_SelectingProvider(object sender, System.Web.ApplicationServices.SelectingProviderEventArgs e)
        {
           // e.ProviderName = "MyCustomProvider";
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}